package com.sunk.springbootmybatisplus.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sunk.springbootmybatisplus.entity.User;
import com.sunk.springbootmybatisplus.mapper.UserMapper;
import com.sunk.springbootmybatisplus.service.IUserService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService{

    @Override
    public List<User> selectListBySQL() {
        return baseMapper.selectListBySQL();
    }

    @Override
    public Page<User> selectUserPage(Page<User> page) {
        return  page.setRecords(baseMapper.selectUserList(page));
    }
}
